package main

import (
    "encoding/hex"
    "fmt"
    "encoding/base64"
    "github.com/thinkoner/openssl"
)

func main() {
    hexStr := "C6876D1EDF9A1F58308DDB675ACA98DFA448AD0EF0E45EE159BF3F3494472099"

    data, _ := hex.DecodeString(hexStr)
    fmt.Println("base64 result:", base64.StdEncoding.EncodeToString(data))

    src := []byte("420682199012101527")
    key := []byte("e0XxEhkWSJcA6Aps")
    dst , _ := openssl.AesECBEncrypt(src, key, openssl.PKCS7_PADDING)
    fmt.Println(base64.StdEncoding.EncodeToString(dst))  // yXVUkR45PFz0UfpbDB8/ew==

    dst , _ = openssl.AesECBDecrypt(dst, key, openssl.PKCS7_PADDING)
    fmt.Println(string(dst)) // 123456
}
